import java.util.HashMap;
import java.util.Map;

class Solution3306 {
    public static void main(String[] args) {
        String s ="iqeaouqi";
        System.out.println(countOfSubstrings(s , 2));
    }

    public static long countOfSubstrings(String word, int k) {
        char[] arr = word.toCharArray();
        Map<Character, Integer> map = new HashMap<>();
        int sum = 0;
        int count = 0;
        int len = arr.length;
        for (int i = 0, j = 0; i < len ; ) {
            while (j < len && (map.size() < 5 || count < k)) {
                char ch = arr[j];
                if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {
                    map.put(ch, map.getOrDefault(ch, 0) + 1);
                } else {
                    count++;
                }
                j++;
            }
            if (map.size() == 5 && count == k) {
                sum++;
            }
            if (j < len && map.containsKey(arr[j])) {
                map.put(arr[j] , map.get(arr[j]) +1) ;
                j ++ ;
            } else {
                char ch = arr[i];
                if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {
                    map.put(ch, map.getOrDefault(ch, 0) - 1);
                    if (map.get(ch) == 0) {
                        map.remove(ch);
                    }
                } else {
                    count--;
                }
                i++ ;
            }

        }
        return sum;
    }
}